package kr.ac.pusan.cse.hts.client;

import kr.ac.pusan.cse.hts.common.data.*;
import kr.ac.pusan.cse.hts.common.network.NetworkController;
import kr.ac.pusan.cse.hts.common.network.NetworkControllerJMSImpl;
import kr.ac.pusan.cse.hts.common.network.ReceiveListener;

public class OrderController implements ReceiveListener {
	private NetworkController nc;
	public OrderController(String name){
		nc = new NetworkControllerJMSImpl(name, "client","server");
		nc.addListener(OKResult.class, this);
		nc.addListener(DealtResult.class, this);
	}
	public void placeOrder(BuySellOrder order) {
		nc.send(order);
	}
	public void received(Object message) {
		System.out.println("wow! in client");
	}
}
